cmake_minimum_required(VERSION 3.28.3)
project(untitled3 C)

set(CMAKE_C_STANDARD 11)


#查找SQLite
find_package(SQLite3 REQUIRED)
#查找GTK3
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)


# 包含 GTK3 头文件目录
include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})
add_definitions(${GTK3_CFLAGS_OTHER})


# 添加可执行文件
add_executable(untitled3  main.c)

# 链接 GTK3 库
target_link_libraries(untitled3 ${GTK3_LIBRARIES})
target_link_libraries(untitled3 SQLite::SQLite3)

